package com.ruleengine.destination.helper;

import org.pf4j.DefaultPluginLoader;
import org.pf4j.PluginClassLoader;
import org.pf4j.PluginDescriptor;
import org.pf4j.PluginManager;

import java.nio.file.Path;

public class RuleEngineDefaultPluginLoader extends DefaultPluginLoader {
    public RuleEngineDefaultPluginLoader(PluginManager pluginManager) {
        super(pluginManager);
    }

    @Override
    protected PluginClassLoader createPluginClassLoader(Path pluginPath, PluginDescriptor pluginDescriptor) {
        return new RuleEngineClassLoader(pluginManager, pluginDescriptor, getClass().getClassLoader());
    }
}
